<template>
  <!-- vue3组件中的模板结构可以没有根标签div -->
  <div class="Child">
    <h3>我是Child组件（子）{{ car.name }}--{{ car.price }}</h3>
    <!-- <Son></Son> -->
  </div>
</template>

<script>
import Son from "./Son";

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Child",
  // eslint-disable-next-line vue/no-unused-components
  components: { Son },
  props: { car: Object },
  setup(props,car) {
    console.log(car);
    // let car = inject("car");
    // return { car };
    return {};
  },
};
</script>

<style>
.Child {
  background-color: skyblue;
  padding: 10px;
}
</style>
